import React, { Component } from "react";
import PropTypes from "prop-types";

// components
import GroupHeader from "./groupHeader";
import TextForm from "../../components/TextForm/form.js";

const mapper = {
  lastWorkDate: "离职日期",
  dismissionReason: "离职原因",
  remainAnnualDays: "剩余年假"
};
export default class LeaveJobInfo extends Component {
  constructor(props) {
    super(props);
  }
  render() {
    const userInfo = this.props.userInfo || {};

    return (
      <div className="growth-profile growth-profile-leave">
        <div className="growth-profile-leave-group">
          <p className="growth-profile-leave-title">离职信息</p>
          <TextForm data={userInfo} labelMapper={mapper} />
        </div>
      </div>
    );
  }
}

LeaveJobInfo.propTypes = {
  userInfo: PropTypes.object
};
